package com.mercury.ec.module.air.controller.admin.demandorder.vo.demandscheme;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.mercury.ec.framework.excel.core.annotations.DictFormat;
import com.mercury.ec.framework.excel.core.convert.DictConvert;
import com.mercury.ec.module.air.controller.admin.demandorder.vo.demandroute.AirDemandRouteRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 机票需求订单方案 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AirDemandSchemeRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14111")
    private Long id;

    @Schema(description = "需求订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28212")
    private Long demandId;

    @Schema(description = "序号")
    @ExcelProperty("序号")
    private Integer serialNo;

    @Schema(description = "预订员id 见表（system_users.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "25808")
    private Long bookUserId;

    @Schema(description = "预订员", requiredMode = Schema.RequiredMode.REQUIRED, example = "小明")
    private String bookUserNickname;

    @Schema(description = "预订部门id 见表（system_dept.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "28942")
    private Long bookDeptId;

    @Schema(description = "预订部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "销售部")
    private String bookDeptName;

    @Schema(description = "预订时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("预订时间")
    private LocalDateTime bookTime;

    @Schema(description = "最后报价操作员id 见表（system_users.id）", example = "23976")
    private Long finallyQuoteUserId;

    @Schema(description = "最后报价操作员", requiredMode = Schema.RequiredMode.REQUIRED, example = "小明")
    private String finallyQuoteUserNickname;

    @Schema(description = "最后报价部门id 见表（system_dept.id）", example = "14148")
    private Long finallyQuoteDeptId;

    @Schema(description = "最后报价部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "销售部")
    private String finallyQuoteDeptName;

    @Schema(description = "最后报价时间")
    @ExcelProperty("最后报价时间")
    private LocalDateTime finallyQuoteTime;

    @Schema(description = "最后核价操作员id 见表（system_users.id）", example = "23976")
    private Long finallyPricingUserId;

    @Schema(description = "最后核价操作员", requiredMode = Schema.RequiredMode.REQUIRED, example = "小明")
    private String finallyPricingUserNickname;

    @Schema(description = "最后核价部门id 见表（system_dept.id）", example = "14148")
    private Long finallyPricingDeptId;

    @Schema(description = "最后核价部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "销售部")
    private String finallyPricingDeptName;

    @Schema(description = "最后核价时间")
    @ExcelProperty("最后核价时间")
    private LocalDateTime finallyPricingTime;

    @Schema(description = "取消规则id 见表（train_cancel_rule.id）", example = "6244")
    private Long cancelRuleId;

    @Schema(description = "取消操作员id 见表（system_users.id）", example = "15336")
    private Long cancelUserId;

    @Schema(description = "取消操作员", requiredMode = Schema.RequiredMode.REQUIRED, example = "小明")
    private String cancelUserNickname;

    @Schema(description = "取消部门id 见表（system_dept.id）", example = "26451")
    private Long cancelDeptId;

    @Schema(description = "取消部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "销售部")
    private String cancelDeptName;

    @Schema(description = "取消时间")
    @ExcelProperty("取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "取消原因")
    @ExcelProperty("取消原因")
    private String cancelCause;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "状态 字典（air_demand_scheme_status）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("air_demand_scheme_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "行程列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<AirDemandRouteRespVO> demandRoutes;
}
